<!-- src/pages/index/CategoryPanel.vue -->
<script setup lang="ts">
import type { HomeCategory } from '@/types/home'

defineProps<{
  list: HomeCategory[]
}>()
</script>

<template>
  <view class="category">
    <navigator
      class="category-item"
      hover-class="none"
      open-type="switchTab"
      url="/pages/category/category"
      v-for="item in list"
      :key="item.id"
      :render-link="false"
    >
      <view class="container">
        <image class="icon" :src="item.icon" lazy-load></image>
        <text class="text">{{ item.name }}</text>
      </view>
    </navigator>
  </view>
</template>

<style lang="scss">
@import './style/CategoryPanel';
</style>
